#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int flag = 0;
void DFS(int s, int v, vector<int>&w, int step,int n)
{
	
	if (step == n ||(v==s&&step<=n))
	{
		if(v==s)
			flag = 1;
		return;
	}
	else
	{
		DFS(s, v + w[step], w, step + 1, n);
		DFS(s, v, w, step + 1, n);
	}
}
int main()
{
	int s, n;
	while (cin >> s >> n)
	{
		vector<int>w(n);
		for (int i = 0; i < n; i++)
		{
			cin >> w[i];
		}
		flag = 0;
		DFS(s, 0, w, 0, n);

		if (flag)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}